﻿<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8" %>

<%@ include file="/core/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="en" class="app">
<head>
    <meta charset="utf-8"/>
    <title>紅花（香港）集團-众艾车代理商管理系统</title>
    <meta name="description"
          content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <%@ include file="/core/memberZong.jsp" %>

    <script type="text/javascript">

        function recommendChange() {
            var recommendLoginName = $("#recommendLoginName").val();

            $.getJSON("<%=basePath%>/member/member/ajaxGetRecommendByName.shtml", {recommendLoginName: recommendLoginName}, function (result) {
                //填入新值
                if (result.success == true) {

                    $("#recommendPersonName").html("推荐人存在，姓名:" + result.member.personName);
                } else {

                    $("#recommendPersonName").html("<b  style='color: red;'>推荐人不存在</b>");
                }

            });
        }

        function centerChange() {

            var centerLoginName = $("#centerLoginName").val();

            $.getJSON("<%=basePath%>/member/member/ajaxGetCenterByName.shtml", {centerLoginName: centerLoginName}, function (result) {
                //填入新值
                if (result.success == true) {

                    $("#centerPersonName").html("服务中心姓名:" + result.member.personName);
                } else {

                    $("#centerPersonName").html("<b  style='color: red;'>该代理商不是服务中心</b>");
                }

            });
        }
        function loginNameChange() {

            var loginName = $("#loginName").val();

            $.getJSON("<%=basePath%>/member/member/ajaxGetMemberByName.shtml", {loginName: loginName}, function (result) {
                //填入新值
                if (result.success == true) {

                    $("#loginNamePersonName").html("<b '>账号名可以用</b>");
                } else {
                    $("#loginNamePersonName").html(
                        "<b  style='color: red;'>账号名已经存在</b>");
                }

            });

        }

        function fatherChange() {

            var fatherLoginName = $("#fatherLoginName").val();

            $.getJSON("<%=basePath%>/member/member/ajaxGetFatherByName.shtml", {fatherLoginName: fatherLoginName}, function (result) {
                //填入新值
                if (result.success == true) {
                    $("#fatherPersonName").html(result.title);
                } else {

                    $("#fatherPersonName").html(
                        "<b  style='color: red;'>节点人不存在</b>");
                }

            });
        }


    </script>

</head>
<body>
<section class="vbox">

    <section>
        <section class="hbox stretch">
            <section id="content1">
                <section class="vbox">
                    <section class="scrollable padder">

                        <div class="m-b-md">
                            <h3 class="m-b-none">注册代理商</h3>
                        </div>
                        <section class="panel panel-default">
                            <header class="panel-heading font-bold"> 注册代理商</header>
                            <div class="panel-body">
                                <form class="form-horizontal" action="<%=basePath%>/member/member/memberAdd.shtml"
                                      method="post" onsubmit="return checkSubmit();">
                                    <jodd:form scopes="request" beans="member">
                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">代理商编号：</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="loginName" name="loginName" class="form-control"
                                                       placeholder="手机号码" onchange="loginNameChange()"><span
                                                    id="loginNamePersonName"></span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">推荐人编号:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="recommendLoginName" name="recommendLoginName"
                                                       onchange="recommendChange()" class="form-control"
                                                       placeholder="推荐人编号"><span
                                                    style="color: red">(*必填)</span><br/><span
                                                    id="recommendPersonName"></span>
                                            </div>
                                        </div>


                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">登陆密码:</label>
                                            <div class="col-sm-10">
                                                <input type="password" id="onePassword" name="onePassword"
                                                       class="form-control" placeholder="登陆密码"><span style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">确认登陆密码:</label>
                                            <div class="col-sm-10">
                                                <input type="password" id="onePasswordRec" name="onePasswordRec"
                                                       class="form-control" placeholder="确认登陆密码"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">安全密码:</label>
                                            <div class="col-sm-10">
                                                <input type="password" id="twoPassword" name="twoPassword"
                                                       class="form-control" placeholder="安全密码"><span style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">确认安全密码:</label>
                                            <div class="col-sm-10">
                                                <input type="password" id="twoPasswordRec" name="twoPasswordRec"
                                                       class="form-control" placeholder="确认安全密码"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">姓名:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="personName" name="personName"
                                                       class="form-control" placeholder="姓名"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">开户名:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="bankPersonName" name="bankPersonName"
                                                       class="form-control" placeholder="开户名"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>


                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">开户行：</label>
                                            <div class="col-sm-10">
                                                <select type="select" class="form-control m-b" id="bankName"
                                                        name="bankName">
                                                    <option value="中国银行">中国银行</option>
                                                    <option value="农业银行">农业银行</option>
                                                    <option value="交通银行">交通银行</option>
                                                    <option value="建设银行">建设银行</option>
                                                    <option value="工商银行">工商银行</option>
                                                    <option value="招商银行">招商银行</option>
                                                    <option value="邮政储蓄银行">邮政储蓄银行</option>
                                                    <option value="光大银行">光大银行</option>
                                                    <option value="民生银行">民生银行</option>
                                                    <option value="平安银行">平安银行</option>
                                                    <option value="中信银行">中信银行</option>
                                                </select>

                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">银行卡号:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="bankCardNo" name="bankCardNo"
                                                       class="form-control" placeholder="银行卡号"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">开户行所在省:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="bankSheng" name="bankSheng" class="form-control"
                                                       placeholder="开户行所在省"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">开户行所在市:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="bankShi" name="bankShi" class="form-control"
                                                       placeholder="开户行所在市"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">开户行详细地址:</label>
                                            <div class="col-sm-10">
                                                <input type="text" id="bankAddress" name="bankAddress"
                                                       class="form-control" placeholder="开户行详细地址"><span
                                                    style="color: red">(*必填)</span>
                                            </div>
                                        </div>


                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <div class="col-sm-4 col-sm-offset-2">
                                                    ${retMsg}
                                            </div>
                                        </div>

                                        <div class="line line-dashed line-lg pull-in"></div>
                                        <div class="form-group">
                                            <div class="col-sm-4 col-sm-offset-2">
                                                    <%--<button type="submit" class="btn btn-default">Cancel</button>--%>
                                                <button type="submit" id="submit" name="submit" class="btn btn-primary">
                                                    提交
                                                </button>
                                            </div>
                                        </div>

                                    </jodd:form>
                                </form>
                            </div>
                        </section>
                    </section>
                </section>

            </section>
        </section>
    </section>

</section>
</body>
</html>